package software_construction.PatternProject.d2_factory.demo4;

import software_construction.PatternProject.d2_factory.demo4.cpu.Cpu;
import software_construction.PatternProject.d2_factory.demo4.factory.DigitalFactory;
import software_construction.PatternProject.d2_factory.demo4.memory.Memory;

public class ComputerStore {
    public Cpu orderCpu(DigitalFactory digitalFactory){
        Cpu cpu = digitalFactory.createCpu();
        cpu.calculate();
        return cpu;
    }
    public Memory orderMemory(DigitalFactory digitalFactory){
        Memory memory = digitalFactory.createMemory();
        memory.storage();
        return memory;
    }
}
